package com.zhengxyou.jetpackdemo.room.entity;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.room.ColumnInfo;

public class NameTuple implements Parcelable {
    @ColumnInfo(name = "first_name")
    public String firstName;
    @ColumnInfo(name = "last_name")
    public String lastName;

    public NameTuple() {
    }

    protected NameTuple(Parcel in) {
        firstName = in.readString();
        lastName = in.readString();
    }

    public static final Creator<NameTuple> CREATOR = new Creator<NameTuple>() {
        @Override
        public NameTuple createFromParcel(Parcel in) {
            return new NameTuple(in);
        }

        @Override
        public NameTuple[] newArray(int size) {
            return new NameTuple[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(firstName);
        dest.writeString(lastName);
    }
}
